<!DOCTYPE html>
<html>
<head>
	<title>zfxt-tool</title>
	<meta name="keywords" content="keyword1,keyword2,keyword3">
	<meta name="description" content="this is my page">
	<meta name="content-type" content="text/html; charset=UTF-8">
	<link href="./plugin/layui/css/layui.css" rel="stylesheet">
	<script src="./plugin/jquery-1.11.2.js"></script>
	<script src="./plugin/json2.js"></script>
	<script src="./plugin/layui/layui.js"></script>
	<script src="./js/index.js"></script>
	<style type="text/css">
		.layui-main {
			width: 80%;
		}

		.site-content {
			padding: 0 0 15px 15px;
			height: 720px;
			border: 1px solid #eee;
			width: calc(100% - 293px);
			word-break: break-all;
			overflow-y: scroll;
		}

		.layui-table {
			width: 100%;
		}

		.layui-panel {
			width: 293px;
		}

		#redisTableTbody {
			height: calc(100% - 39px);
		}

		.layui-row {
			display: flex;
		}

		.layui-table {
			margin-bottom: 0;
		}

		#redisDbMenu {
			height: 700px;
			overflow-x: hidden;
		}
	</style>
</head>

<body>
<div>
	<div class="layui-main">
		<div class="layui-tab">
			<ul class="layui-tab-title">
				<li class="layui-this">FTP</li>
				<li>Redis</li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
					<!--					<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">-->
					<!--						<legend>连接</legend>-->
					<!--					</fieldset>-->
					<form class="layui-form" action="" id="ftpForm">
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label">主机IP：</label>
								<div class="layui-input-block">
									<input type="text" name="ip" lay-verify="required" placeholder="请输入IP"
										   class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">端口号：</label>
								<div class="layui-input-block">
									<input type="number" name="port" lay-verify="required" placeholder="请输入端口号"
										   value="21"
										   class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">用户名：</label>
								<div class="layui-input-block">
									<input type="text" name="userName" lay-verify="required" placeholder="请输入用户名"
										   class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">密码：</label>
								<div class="layui-input-block">
									<input type="text" name="passWord" lay-verify="required" placeholder="请输入密码"
										   class="layui-input">
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="">
								<button type="button" class="layui-btn" onclick="ftpTest()">测试连接</button>
								<button type="button" class="layui-btn" onclick="ftpFiles()">加载文件列表</button>
								<button type="button" class="layui-btn" onclick="ftpUpload()">上传测试文件</button>
								<button type="button" class="layui-btn" onclick="ftpDelete()">删除测试文件</button>
							</div>
						</div>
					</form>
					<table class="layui-table" id="ftpFileTable">
						<colgroup>
							<col width="200">
							<col width="200">
							<col>
						</colgroup>
						<thead>
						<tr>
							<th>名称</th>
							<th>时间</th>
						</tr>
						</thead>
						<tbody id="ftpFileTableTbody"></tbody>
					</table>
				</div>
				<div class="layui-tab-item">
					<form class="layui-form" action="" id="redisForm">
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label">主机IP：</label>
								<div class="layui-input-block">
									<input type="text" name="host" lay-verify="required" placeholder="请输入IP"
										   class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">端口号：</label>
								<div class="layui-input-block">
									<input type="number" name="port" lay-verify="required" placeholder="请输入端口号"
										   value="6379" class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">密码：</label>
								<div class="layui-input-block">
									<input type="text" name="password" lay-verify="required" placeholder="请输入密码"
										   class="layui-input">
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="">
								<button type="button" class="layui-btn" onclick="redisTest()">测试连接
								</button>
								<button type="button" class="layui-btn" onclick="redisKeys()">刷新键值
								</button>
							</div>
						</div>
					</form>

					<div class="layui-row layui-col-space10">
						<div class="layui-panel layui-col-md3">
							<ul class="layui-menu" id="redisDbMenu">

							</ul>
						</div>
						<div class="layui-col-md9 site-content">
							<table class="layui-table" style="margin-top: 0px;" id="redisTable">
								<thead id="redisTableThead"></thead>
								<tbody id="redisTableTbody"></tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>

	</div>
</div>

</body>
</html>
